gdk/wayland: Drop motion hint mask from seat grab event masks
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 11 Aug 2022 23:36:59 +0000 (01:36 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 11 Aug 2022 23:54:08 +0000 (01:54 +0200)
At best, it's just an awkward event mask sitting there for a backend
that does not need it. At worst, this may result in motion events being
eaten away in the right set of circumstances.

Avoid the pointer motion hint mask, and rely on events being further
than hints.

Related: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/534#note_1526935

gdk/wayland/gdkdevice-wayland.c

index 67bd322340a3106001c79de42fadeaba8da6a6f4..ed6ad3b138df7a41d00ef16fe4f2b5738cd5d142 100644 (file)
@@ -4937,7 +4937,7 @@ gdk_wayland_seat_grab (GdkSeat                *seat,
                                     native,
                                     GDK_OWNERSHIP_NONE,
                                     owner_events,
-                                    GDK_ALL_EVENTS_MASK,
+                                    GDK_ALL_EVENTS_MASK & ~GDK_POINTER_MOTION_HINT_MASK,
                                     _gdk_display_get_next_serial (display),
                                     evtime,
                                     FALSE);
@@ -4959,7 +4959,7 @@ gdk_wayland_seat_grab (GdkSeat                *seat,
                                     native,
                                     GDK_OWNERSHIP_NONE,
                                     owner_events,
-                                    GDK_ALL_EVENTS_MASK,
+                                    GDK_ALL_EVENTS_MASK & ~GDK_POINTER_MOTION_HINT_MASK,
                                     _gdk_display_get_next_serial (display),
                                     evtime,
                                     FALSE);
@@ -4977,7 +4977,7 @@ gdk_wayland_seat_grab (GdkSeat                *seat,
                                     native,
                                     GDK_OWNERSHIP_NONE,
                                     owner_events,
-                                    GDK_ALL_EVENTS_MASK,
+                                    GDK_ALL_EVENTS_MASK & ~GDK_POINTER_MOTION_HINT_MASK,
                                     _gdk_display_get_next_serial (display),
                                     evtime,
                                     FALSE);
@@ -5003,7 +5003,7 @@ gdk_wayland_seat_grab (GdkSeat                *seat,
                                         native,
                                         GDK_OWNERSHIP_NONE,
                                         owner_events,
-                                        GDK_ALL_EVENTS_MASK,
+                                        GDK_ALL_EVENTS_MASK & ~GDK_POINTER_MOTION_HINT_MASK,
                                         _gdk_display_get_next_serial (display),
                                         evtime,
                                         FALSE);